home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
comm
/
cnet
/
cnet_searcher.lha
/
cnetsearcher
/
Update200
< prev
Wrap
Text File
|
1997-09-05
|
5KB
|
100 lines
/**************************************************************************\
$VER: CNet Searcher Update, v2.00 (5-Sep-97) by Dotoran of Frontiers!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR
a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
tr "f1CNet Amiga Searcher, UPDATE 2.00, by Dotoran of Frontiers!n1"
se " Welcome to CNet Amiga Searcher! This script will update a v1.46 of "
se "Searcher to the NEWER formats used in v2.00! You should NOT use this "
se "script if you are using an OLDER version of Searcher, or if you are "
se "installing Searcher for the first time. Are you ready to continue? [No]: "
gc;a=result;if a~="Y" then do;tr "No.";exit;end;else tr "Yes!"
a=exists(df"Puzzles/Puz01") ; if a=0 then do
se "n1 You are NOT using v1.46 of Searcher! Please install this file for "
tr "the first time OR get v1.46 first!"
exit ; end
se "n1 There are numerous NEW additions made to the program. Please take a "
se "moment to read through the HISTORY guide file to get an idea as to what "
tr "exactly has changed in this version."
se "n1 The `!Puzzles' data file has been changed slightly and is now being "
se "stored directly in the `"df"' directory, instead of within the `Puzzles/' "
se "subdirectory. The filenames for each puzzle have also changed, so as to "
se "make adding NEW puzzles into Searcher a breeze. Please refer to Searcher's "
se "README guide file for more information. Tap any key to begin the conversion "
tr "process...g1n1@4"
se "Reading your !Puzzles file..."
call open(f1,df"Puzzles/!Puzzles","R")
do i=1 until eof(f1) ; a=readln(f1)
if a>"" then do ; parse var a n.i" "p.i
pn.i=compress(translate(p.i," ","(),.!?`'"d2c(34)))
end
end i ; tot=i-1
call close(f1)
tr "Done.n1"
call open(f1,df"!Puzzles","W")
do i=1 to tot
se "Renaming `Puz"right(n.i,2,"0")"' as `"pn.i"' now..."
address command "rename "df"Puzzles/Puz"right(n.i,2,"0")" "df"Puzzles/"pn.i
tr "done."
if exists(df"Puzzles/Puz"right(n.i,2,"0")".champs") then do
se "Renaming `Puz"right(n.i,2,"0")".champs' as `"pn.i".champs' now..."
address command "rename "df"Puzzles/Puz"right(n.i,2,"0")".champs "df"Puzzles/"pn.i".champs"
tr "done."
end
se " Counting words in the `"pn.i"' puzzle..."
call open(f2,df"Puzzles/"pn.i,"R")
do j=1 until eof(f2);a=readln(f2);end j;wds=j-1
call close(f2);tr wds" total words!"
se " Adding this entry to !Puzzles..."
call writeln(f1,right(wds,2,"0")" "p.i)
tr "done.n1"
end i
call close(f1)
se "Deleting the old `"df"Puzzles/!Puzzles' file..."
call DELETE(df"Puzzles/!Puzzles");tr "done."
se "n1Sorting Puzzles Alphabetically by Title..."
address command "sort "df"!Puzzles "df"!Puzzles COLSTART 3";tr "done."
se "n1Sorting Puzzles by the Number of Words..."
address command "sort "df"!Puzzles "df"!Puzzles2";tr "done."
se "n1 CNet Amiga Searcher, v2.00 now allows for Multiple Game Saves. This "
se "means the SAVED GAME files have changed format. While completing the coding "
se "of this new feature, I discovered a bug in the SAVE GAME feature in the "
se "v1.46 version which could cause the Answers Hint Option to fail. Because "
se "of this, I'll now DELETE any existing SAVED GAME files found on your BBS "
tr "pertaining to Searcher. Press any key to begin this process...g1"
SIGNAL OFF ERROR /* In case NO saved files are found */
address command "delete mail:users/#?/_searcher"
SIGNAL ON ERROR
se "n1 The conversion process is complete! Please take a moment to read "
se "through the HISTORY guide file and refer to the README guide file for "
se "info on adding NEW puzzles into Searcher. You won't believe how EASY it "
tr "is now! hehe"
exit
CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
logentry "Lost Carrier!!";bufferflush;exit
SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
e2=" Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
bufferflush
/**************************************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/